package lianxi;

//简单的计算器程序

import java.util.Scanner;

public class test01 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入要运算的两个整数");
        int a = sc.nextInt();
        int b = sc.nextInt();

        System.out.println("请输入您的选择：1.加法，2.减法，3.乘法，4.除法");
        int c = sc.nextInt();
        switch (c) {
            case 1:
                int jia = a + b;
                System.out.println(a + " + " + b + " =" + jia);
                break;
            case 2:
                int jie = a - b;
                System.out.println(a + " + " + b + " =" + jie);
                break;
            case 3:
                int cheng = a * b;
                System.out.println(a + " + " + b + " =" + cheng);
                break;
            case 4:
                int chu = a / b;
                System.out.println(a + " + " + b + " =" + chu);
                break;
            default:
                System.out.println("符号非法!");
        }

    }
}
